import {axioslink} from "api/api.js"

export let home={
    state: {
        home:[],
    },
    mutations: {
        //处理数据的地方
        HomeInit(state,payload){
            state.home=payload
        }
    },
    actions: {
        //使用Actions 进行异步操作（异步请求)
        Homexaxios(context){
            axioslink("/home/list","get").then((ok)=>{
                // console.log(ok.data.home)
                context.commit("HomeInit",ok.data.home)
            })
        }
    }
}